package com.ruoyi.common.number;

import com.ruoyi.common.xss.XssValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 自定义 NotNumber 校验注解
 * author: 核桃
 * date: 2023/11/23
 **/
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
@Constraint(validatedBy = { NotNumberValidator.class })
public @interface NotNumber {
    String message()

    default "不允许含有数字";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
